﻿using AIStudio.Protobuf.Formatters;
using AIStudio.Service.Quartz;
using AIStudio.Service.WebSocketEx;
using AIStudio.Service.WorkflowCore;
using Coldairarrow.Api;
using Coldairarrow.Util;
using EFCore.Sharding;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using NSwag;
using Quartz;
using Quartz.Impl;
using System;
using System.IO;
using System.Linq;

namespace AIStudio.Api_Dev
{
    public class Startup : Coldairarrow.Api.Startup
    {
        public Startup(IConfiguration configuration) : base(configuration)
        {
        }

        protected override IMvcBuilder AddControllers(IServiceCollection services)
        {
            return services.AddControllers(options =>
            {
                options.Filters.Add<ValidFilterAttribute>();
                options.Filters.Add<GlobalExceptionFilter>();
                options.AddProtobufFormatter();
            });
        }
    }
}
